package de.unimannheim.ki.databaseentities;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
/**
 * Persistence class for user ratings
 * @author 
 *
 */
@Entity
public class UserEvaluation  implements Serializable{
	
	
	private static final long serialVersionUID = 1L;
	
	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	private int id;
	
	private String subject;
	
	private int rating;
	
	@ManyToOne(cascade=CascadeType.PERSIST)
    @JoinColumn(name="FBID")
    private Musicuser musicuser;

	public UserEvaluation() {
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public int getRating() {
		return rating;
	}

	public void setRating(int rating) {
		this.rating = rating;
	}

	public Musicuser getMusicuser() {
		return musicuser;
	}

	public void setMusicuser(Musicuser musicuser) {
		this.musicuser = musicuser;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
}
